class Solution {
public:
    int peopleAwareOfSecret(int n, int delay, int forget) {
        vector<long long> peo(n+2,0);
        long long res = 0;
        int MOD = 1e9 + 7;
        peo[1] = 1;
        for(int i = 2;i <= n;i++)
        {

            int plus = 0;
            for(int j = 0; j < i;j++)
            {
                if(i - j >= forget)
                {
                    peo[j] = 0;
                }
                if(i - j >= delay)
                {
                    plus = (plus + peo[j]) % MOD;
                }
            }
            peo[i] = plus;
        }
        for(int num : peo)
        {
            res = (res + num) % MOD;
        }
        return (int)res;
    }
};